import { constantRoutes } from '@/router/index'

export default {
  namespaced: true,
  state: {
    // 存储路由列表,静态路由为初始值
    menuList: [...constantRoutes]
  },
  mutations: {
    // 添加动态的路由
    setMenuList(state, asyncRoutes) {
      state.menuList = [...constantRoutes, ...asyncRoutes]
    }
  }
}

